Skip to content

Harden tag-triggered release workflow#36

Open
spapa013 wants to merge 2 commits intonauticalab:mainfrom
spapa013:spapadop/plt-864-harden-tag-triggered-release-workflow
Open

Harden tag-triggered release workflow#36
spapa013 wants to merge 2 commits intonauticalab:mainfrom
spapa013:spapadop/plt-864-harden-tag-triggered-release-workflow

Conversation

@spapa013
Copy link
Collaborator

Summary

The existing release workflow was a prototype — it had a hardcoded Go version that doesn't exist (1.25), duplicated all build logic already owned by Taskfile, had no manual dispatch trigger, no smoke test, and no distinction between tested and untested platforms. This PR hardens the workflow to be intentional, maintainable, and the default release path.

Changes

.github/workflows/release.yml

  • Add workflow_dispatch trigger for manual releases
  • Use go-version-file: go.mod as source of truth for Go version (fixes incorrect hardcoded "1.25")
  • Delegate test job to run-test.yml as a reusable workflow via workflow_call
  • Replace 40-line inline build block with task build:dist
  • Add devenv --version smoke test after build
  • Add comment distinguishing integration-tested (linux/amd64) vs cross-compiled platforms
  • Use versioned artifact naming (devenv_{version}_{os}_{arch}) with glob upload

.github/workflows/run-test.yml

  • Add workflow_call trigger so it can be called by release.yml
  • Use go-version-file: go.mod (fixes hardcoded "1.24")
  • Replace inline go test invocation with task test:ci

Taskfile.yml

  • Promote VERSION, COMMIT, BUILD_TIME, GO_VERSION, LDFLAGS to global vars — eliminates 6x duplication across build tasks
  • Add missing build:linux-arm64 task; include in build:all
  • Add build:dist — builds all 5 platforms into dist/ with version-in-filename naming and checksums (used by CI)
  • Add test:ci with full coverage flags; test now runs with -race
  • clean now removes dist/

Testing

  • All tests pass locally via task test:ci
  • task build:dist produces correct versioned artifacts with valid checksums
  • Full end-to-end release tested via tag push — all 5 platform binaries published, version string verified (devenv version v0.0.1-test), checksums validated

Notes

  • When workflow_dispatch is triggered without a tag the Create Release step will fail — this is expected and acceptable; the trigger is useful for validating the build pipeline without publishing
  • The test job in the Actions UI appears as Run Tests / build due to the reusable workflow job naming — this is expected behavior

Closes PLT-864

- Add workflow_dispatch trigger to release workflow
- Use go-version-file: go.mod as source of truth for Go version in both workflows
- Replace inline build logic in release.yml with task build:dist
- Add devenv --version smoke test with comment distinguishing integration-tested vs cross-compiled platforms
- Use versioned artifact naming (devenv_{version}_{os}_{arch}) with glob upload
- Extract run-test.yml as reusable workflow via workflow_call; release.yml test job delegates to it
- Add task test:ci with full coverage flags; task test now runs with -race
- Add build:dist task for CI release builds into dist/ with version-in-filename
- Add missing build:linux-arm64 task; include in build:all
- Promote VERSION, COMMIT, BUILD_TIME, GO_VERSION, LDFLAGS to global Taskfile vars, eliminating 6x duplication

Refs PLT-864
@spapa013 spapa013 requested a review from eywalker March 18, 2026 20:45
@codecov
Copy link

codecov bot commented Mar 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant